package com.cyzy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cyzy.domain.dto.ResponseData;
import com.cyzy.domain.vo.TSeed;
import com.cyzy.mapper.SeedMapper;
import com.cyzy.service.TSeedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TSeedServiceImpl implements TSeedService {
//    种植
     @Autowired
     private SeedMapper seedMapper;
//  全部植物
     @Override
     public ResponseData all() {
//          查询全部
          List<TSeed> data = seedMapper.selectList(new QueryWrapper<TSeed>());
          ResponseData responseData = new ResponseData();
          responseData.setCode(200);
          responseData.setData(data);
          return responseData;
     }
}
